package main

import (
	_ "beegoProject/routers"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql" // import your used driver
	"fmt"
)

func main() {
	fmt.Println("mmmmmmmmmmmmmmmmmmmmmmmmmain")
	beego.Run()
}

func init()  {
	fmt.Println("iiiiiiiiiiiiiiiiiiiiiiiiiiinit")
	var user string=beego.AppConfig.String("mysqluser")
	var password string= beego.AppConfig.String("mysqlpass")
	var ip string = beego.AppConfig.String("mysqlurls")
	var dbName string = beego.AppConfig.String("mysqldb")
	// set default database
	orm.RegisterDataBase("default", "mysql", ""+ user + ":" + password + "@tcp(" + ip + ":3306)/" + dbName + "?charset=utf8", 30)

}
